package com.hwl.lab.repository;

import com.hwl.lab.entity.User;
import com.hwl.lab.entity.UserAndRole;
import org.springframework.data.jpa.repository.JpaRepository;

import javax.transaction.Transactional;
import java.util.List;

public interface UserAndRoleRepository extends JpaRepository<UserAndRole,Long> {
    @Transactional
    List<UserAndRole> findRolenameByUserid(String userid);
     @Transactional
    void deleteByUserid(String userid);
    @Transactional
    UserAndRole findByUseridAndRolename(String userid,String Rolename);

}
